package com.li.sssp.imp;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.li.sssp.entity.Employee;
import com.li.sssp.inter.ICRUD;
import com.li.sssp.parentclass.Person;
import com.li.sssp.repository.EmployeeRepository;

@Service
public class User extends Person implements ICRUD<Employee> {

	@Autowired
	private EmployeeRepository employeeRepository;

	@Override
	public List<Employee> getPorject(Integer id) {
		// TODO Auto-generated method stub
		// Employee employee=new
		// Employee(Integer.getInteger("123"),"isme","hello@hell.com",Date.valueOf("2018-01-01
		// 11:00:00"),Date.valueOf("2018-01-01 11:00:00"),new Department());
		// List<Employee> ls=new ArrayList<>();
		// ls.add(employee);
		// EmployeeService employeeService=new EmployeeService();
		// return employeeService.getAll();
		// return ls;
		return employeeRepository.findAll();
	}

	@Override
	public void insert(Object entity) {
		// TODO Auto-generated method stub

	}

	public String jump() {
		return "I'm jump";
	}

}
